<template>
  <!-- Content Wrapper. Contains page content -->
  <div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <section class="content-header">
      <h1>
        货架管理
        <small>管理您仓库中的货架</small>
      </h1>
      <ol class="breadcrumb">
        <li><a href="#"><i class="fa fa-university"></i> 货架管理</a></li>
        <li class="active">货架详情</li>
      </ol>
    </section>

    <!-- Main content -->
    <section class="content">
      <div class="row">
        <div class="col-xs-12">


          <div class="box">
            <div class="box-header">
              <h3 class="box-title">货架总览</h3>
              <router-link to="/main/addRack">
                <button class="btn btn-success pull-right" type="button">添加货架</button>
              </router-link>
            </div>
            <!-- /.box-header -->
            <div class="box-body">
              <table id="example1" class="table table-bordered table-striped">
                <thead>
                <tr>
                  <th>货架id</th>
                  <th>名称</th>
                  <th>操作</th>
                </tr>
                </thead>
                <tbody>
                <tr v-for="rack in rackList" :key="rack.id">
                  <td>{{ rack.id }}</td>
                  <td>{{ rack.name }}</td>
                  <td class="col-xs-1">
                    <div>
                      <router-link :to="'/main/changeRack/'+rack.id">
                        <button class="btn btn-warning" type="button">修改</button>
                      </router-link>
                    </div>
                  </td>
                </tr>

                </tbody>
                <tfoot>
                <tr>
                  <th>货架id</th>
                  <th>名称</th>
                  <th>操作</th>
                </tr>
                </tfoot>
              </table>
            </div>
            <!-- /.box-body -->
          </div>
          <!-- /.box -->
        </div>
        <!-- /.col -->
      </div>
      <!-- /.row -->
    </section>
    <!-- /.content -->
  </div>
  <!-- /.content-wrapper -->
</template>

<script>
export default {
  name: "RackData",
  data() {
    return {
      rackList: this.GLOBAL.appData.rackList,
    }
  }
}
</script>

<style scoped>

</style>